<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page language="java" pageEncoding="UTF-8" import="java.util.*"%>
<%@ taglib uri="/WEB-INF/FCKeditor.tld" prefix="FCK"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<%@ include file="/pages/safeai/jsp/common/meta.jsp"%>
<html>
<head>
<title>商品管理</title>
<link href="${ctx}/css/jquery.popup.css" rel="stylesheet" type="text/css">
<link href="${ctx}/css/jquery.treeview.css" rel="stylesheet" type="text/css">
<link href="${ctx}/css/safeai/together.css" rel="stylesheet" type="text/css">
<script language="javascript" src="${ctx}/script/common/jquery.js"></script>
<script language="javascript" src="${ctx}/script/common/jquery.treeview.js"></script>
<script language="javascript" src="${ctx}/script/common/jquery.cookie.js"></script>
<script language="javascript" src="${ctx}/script/common/jquery.dimensions.js"></script>
<script language="javascript" src="${ctx}/script/common/jquery.popup.js"></script>
<script type="text/javascript" src="${ctx}/script/product/catalog.js"></script>
<script type="text/javascript" src="${ctx}/dwr/interface/catalogHelper.js"></script>
<script type='text/javascript' src='${ctx}/dwr/interface/filterService.js'></script>
<script type='text/javascript' src='${ctx}/dwr/interface/productService.js'></script>
<script type='text/javascript' src='${ctx}/dwr/engine.js'></script>
<script type="text/javascript" src="${ctx}/script/common/common.js"></script>
<script type="text/javascript" src="${ctx}/script/product/product.js"></script>
<script type="text/javascript">
     $(document).ready(function(){
			jQuery(function($){
				    $("input#catalog").popup(builderTreeTag(2));
				    $(".treeview-popup").treeview({ 
			        persist: "cookie",
			        cookieId: "treeview-popup"
		        });
			    });
  	$("ul.treeview-popup li>a").click(function(){
  	
	if(confirm('注意：改变分类将清空本商品的可搜索内容！')) {
		var method = document.getElementById("method").value;
		if(method=="UpdateProduct"){
		var	id=document.getElementById("product.id").value;
		}
		document.getElementById("product.catalogId").value=this.id;
		var json='{id:'+id+'}';
		var Parameter = eval("(" + json + ")");
		productService.updateRecord("product_sqlMap.clearSearchs",Parameter);
		document.subSearchs.action="${ctx}/product/productMessage.do?method=getProductSearchs&id="+id+"&catalogId="+this.id;
		document.subSearchs.submit();
	}	
  	});
  })
  
  function checkCode(){
  		var productCode = document.getElementById("productCode").value;
  		var productId = document.getElementById("productId"); 
  		
  		if(productCode!=""){
  			productCode = productCode.trim();
  			document.getElementById("productCode").value = productCode;
  			
  			var para = "method=checkCode"+"&productCode="+productCode
	  		if(productId!=null){
	  			 para = para+"&productId="+productId.value;
	  		} 
  		
	        $.ajax({
			  type: "POST",
			  url: "${ctx}/product/productMessage.do",
			  data: para,
			     success: function(msg){
					 if(msg == "true"){
					 	alert("输入的产品编码已存在,请重新输入!");
					 	document.getElementById("productCode").focus();
					 	document.getElementById("checkCodeRe").value = "true";
					 }else{
					 	document.getElementById("checkCodeRe").value = "false";
					 }
				}
			});
		}
  }
  
  
  
 </script>

<%@ include file="/pages/safeai/jsp/common/meta.jsp"%>
<%
	Date d = new Date();
	Long time = d.getTime();
%>
</head>
<body onkeydown="if(event.keyCode==13)return false;">
<html:form method="post" action="/product/productMessage"
	enctype="multipart/form-data" onsubmit="return checkModifyProduct();">
	<logic:present name="product">
		<input type="hidden" name="method" value="UpdateProduct" />
		<bean:define id="product" name="product"></bean:define>
		<input type="hidden" id="productId" name="product.id" value="${product.id}" />
	</logic:present>
	
	<logic:notPresent name="product">
		<input type="hidden" name="method" value="addProduct" />
	</logic:notPresent>
	<table width="100%" align="center">
		<tr>
			<th colspan="8" height="30">编辑资料</th>
			<input type="hidden" id="checkCodeRe" value="false" />
		</tr>
		<tr>
			<td nowrap class="td_01">名称</td>
			<td colspan="3" class="td_02"><input type="text"
				value="${product.name}" name="product.name" maxlength="155" /><span style="color:red;">﹡</span></td>
			<td nowrap class="td_01">促销信息</td>
			<td colspan="3" class="td_02"><input type="text"
				value="${product.promote}" name="product.promote" maxlength="127" /></td>
		</tr>
		<tr>
			<td nowrap class="td_01">类别</td>
			<td colspan="3" class="td_02"><input type="hidden"
				name="product.catalogId" value="${product.catalogId}" /> <input
				id="catalog" name="product.catalogName" type="text"
				value="${product.catalogName}" /><span style="color:red;">﹡</span></td>

			<td nowrap class="td_01">产地</td>
			<td colspan="3" class="td_02"><input type="text"
				value="${product.area}" name="product.area" maxlength="50"/></td>
		</tr>
		<tr>
			<td nowrap class="td_01">品牌</td>
			<td colspan="3" class="td_02"><select name="product.brandId">
				<logic:present name="BrandName">
					<logic:present name="product">
						<logic:iterate id="brandName" name="BrandName">
							<option value="${brandName.id}"
								<logic:equal value="${brandName.id}" name="product" property="brandId">selected</logic:equal>>${brandName.name}</option>
						</logic:iterate>
					</logic:present>
					<logic:notPresent name="product">
						<logic:iterate id="brandName" name="BrandName">
							<option value="${brandName.id}">${brandName.name}</option>
						</logic:iterate>
					</logic:notPresent>
				</logic:present>
				<logic:notPresent name="BrandName">
					<option value="0">请添加品牌</option>
				</logic:notPresent>
			</select>
				<span style="color:red;">﹡</span>
			</td>
			<td rowspan="2" nowrap class="td_01">商品简介</td>
			<td colspan="3" rowspan="2" class="td_02"><textarea
				name="product.description4" cols="30" rows="3">${product.description4}</textarea></td>
		</tr>
		<tr>
			<td nowrap class="td_01">状态</td>
			<td colspan="3" class="td_02"><logic:present name="product">
				<select name="product.status">
					<option value="0"
						<logic:equal name="product" property="status" value="0">selected</logic:equal>>即将上市</option>
					<option value="1"
						<logic:equal name="product" property="status" value="1">selected</logic:equal>>现货</option>
					<option value="2"
						<logic:equal name="product" property="status" value="2">selected</logic:equal>>需订货</option>
					<option value="3"
						<logic:equal name="product" property="status" value="3">selected</logic:equal>>暂时缺货</option>
					<option value="4"
						<logic:equal name="product" property="status" value="4">selected</logic:equal>>停产</option>
					<option value="5"
						<logic:equal name="product" property="status" value="5">selected</logic:equal>>已删除</option>
				</select>
			</logic:present> <logic:notPresent name="product">
				<select name="product.status">
					<option value="0">即将上市</option>
					<option value="1">现货</option>
					<option value="2">需订货</option>
					<option value="3">暂时缺货</option>
					<option value="4">停产</option>
				</select>
			</logic:notPresent></td>
		</tr>
		<tr>
			<td rowspan="2" nowrap class="td_01">售价</td>
			<td colspan="3" rowspan="2" class="td_02">
			<input type="hidden" name="isPriceChange" id="isPriceChange"/>
            <input type="text" value="${product.price}" onchange="getTaxPriceOrPoint();" name="product.price" value="100" maxlength="7" /><span style="color:red;">﹡</span></td>
			<td nowrap class="td_01">产品积分</td>
			<td class="td_02"><input type="text" name="product.getPoint" maxlength="5" value="${product.getPoint}"/></td>
			<td nowrap class="td_01">是否可用积分购买</td>
			<td class="td_02"><logic:present name="product">
				<select name="product.canPoint">
					<option value="1">是</option>
					<option value="0"
						<logic:notEqual name="product" property="canPoint" value="1">selected</logic:notEqual>>否</option>
				</select>
			</logic:present> <logic:notPresent name="product">
				<select name="product.canPoint">
					<option value="1">是</option>
					<option value="0">否</option>
				</select>
			</logic:notPresent></td>
		</tr>
		<tr>
			<td nowrap class="td_01">含税价格</td>
			<td class="td_02">
            	<input type="text" name="product.taxprice" value="${product.taxprice}" maxlength="7"/>
            </td>
			<td nowrap class="td_01">保修条款</td>
			<td class="td_02"><logic:present name="product">
				<select name="product.attention">
					<option value="1"
						<logic:equal name="product" property="attention" value="1">selected</logic:equal>>全国联保</option>
					<option value="2"
						<logic:equal name="product" property="attention" value="2">selected</logic:equal>>锐意店保</option>
					<option value="0"
						<logic:equal name="product" property="attention" value="0">selected</logic:equal>>没有保修</option>
				</select>
			</logic:present> <logic:notPresent name="product">
				<select name="product.attention">
					<option value="1">全国联保</option>
					<option value="2">锐意店保</option>
					<option value="0">没有保修</option>
				</select>
			</logic:notPresent></td>
		</tr>
		<tr>
			<td nowrap class="td_01">编码</td>
			<td colspan="3" class="td_02">
				<input value="${product.code}" id="productCode" name="product.code" onchange="checkCode();" maxlength="20" /><span style="color:red;">﹡</span>
			</td>
				
			<td nowrap class="td_01">总点击量</td>
			<td class="td_02">
            	<input size="10" value="${product.clicks}" name="product.clicks"/>
            </td>
			<td nowrap class="td_01">月点击量</td>
			<td class="td_02"><input size="7" value="${product.monthclicks}"
				name="product.monthclicks" maxlength="25" /></td>
		</tr>
		<tr>
			<td rowspan="2" nowrap class="td_01">保修时间</td>
			<td colspan="3" rowspan="2" class="td_02"><textarea
				name="product.present" rows="3" cols="30">${product.present}</textarea></td>
			<td nowrap class="td_01">顺序</td>
			<td class="td_02"><input value="${product.sequence}"
				name="product.sequence" size="10" /><span style="color:red;">﹡</span></td>
			<td nowrap class="td_01">颜色</td>
			<td class="td_02"><input size="10" value="${product.color}"
				name="product.color" maxlength="25" /></td>
		</tr>
		<tr>
			<td nowrap class="td_01">关键字</td>
			<td colspan="3" class="td_02"><input size="27"
				value="${product.keywords}" name="product.keywords" maxlength="60"/></td>
		</tr>
		<tr>
			<td nowrap class="td_01">产品描述</td>
			<td colspan="7" height="350" class="td_02"><FCK:editor
				id="product.description1" basePath="${ctx}/FCKeditor/"
				width="98%" height="350" defaultLanguage="zh-cn"
				toolbarSet="catalog" tabSpaces="8"
				imageBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/pages/safeai/jsp/connector"
				linkBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/pages/safeai/jsp/connector"
				flashBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/pages/safeai/jsp/connector"
				imageUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"
				linkUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"
				flashUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash">
              ${product.description1}
  		</FCK:editor></td>
		</tr>
		<tr>
			<td nowrap class="td_01">详细规格</td>
			<td colspan="7" height="350" class="td_02"><FCK:editor
				id="product.description2" basePath="${ctx}/FCKeditor/"
				width="98%" height="350" defaultLanguage="zh-cn"
				toolbarSet="catalog" tabSpaces="8"
				imageBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/pages/safeai/jsp/connector"
				linkBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/pages/safeai/jsp/connector"
				flashBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/pages/safeai/jsp/connector"
				imageUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"
				linkUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"
				flashUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash">
              ${product.description2}
  		</FCK:editor></td>
		</tr>
		<tr>
			<td nowrap class="td_01">图片1</td>
			<td colspan="3" class="td_02">
			<a href="javaScript:void(0);"> <img height="80" src="${ctx}/${product.image1}?time=<%=time%>" width="80" /></a>&nbsp;&nbsp;<span style="color:red;">注：图片尺寸： 500*500,格式为：.JPG,大小为：10Mb</span><br>
			<input type="file" value="${product.image1}" name="product.image1File" onkeypress="alert('不允许手工填写'); window.event.returnValue=false;"/> 
			<input type="hidden" value="${product.image1}" name="oldImage1" /><br />
			<font color="red">${file1}</font></td>
			<td rowspan="3" nowrap class="td_01">包装清单</td>
			<td colspan="3" rowspan="3" class="td_02"><FCK:editor
				id="product.description3" basePath="${ctx}/FCKeditor/"
				width="98%" height="300" defaultLanguage="zh-cn"
				toolbarSet="catalog" tabSpaces="8"
				imageBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/pages/safeai/jsp/connector"
				linkBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/pages/safeai/jsp/connector"
				flashBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/pages/safeai/jsp/connector"
				imageUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"
				linkUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"
				flashUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash">
              ${product.description3}
  			</FCK:editor></td>
		</tr>
		<tr>
			<td nowrap class="td_01">图片2</td>
			<td colspan="3" class="td_02"><a href="javaScript:void(0);"> <img
				height="80" src="${ctx}/${product.image2}?time=<%=time%>" width="80" /></a>&nbsp;&nbsp;<span style="color:red;">注：图片尺寸： 500*500,格式为：.JPG,大小为：10Mb</span><br>
			<input type="file" name="product.image2File" onkeypress="alert('不允许手工填写'); window.event.returnValue=false;"> <input
				type="hidden" value="${product.image2}" name="oldImage2" /><br />
			<font color="red">${file2}</font></td>
		</tr>
		<tr>
			<td nowrap class="td_01">图片3</td>
			<td colspan="3" class="td_02"><a href="javaScript:void(0);"> <img
				height="80" src="${ctx}/${product.image3}?time=<%=time%>" width="80" /></a>&nbsp;&nbsp;<span style="color:red;">注：图片尺寸： 500*500,格式为：.JPG,大小为：10Mb</span><br>
			<input type="file" name="product.image3File" onkeypress="alert('不允许手工填写'); window.event.returnValue=false;"> <input
				type="hidden" value="${product.image3}" name="oldImage3" /><br />
			<font color="red">${file3}</font></td>
		</tr>
		<tr>
			<td nowrap class="td_01">是否免运费</td>
			<td colspan="3" class="td_02"><logic:present name="product">
				<select name="product.freeDeliver">
					<option value="0">否</option>
					<option value="1"
						<logic:notEqual name="product" property="freeDeliver" value="0">selected</logic:notEqual>>是</option>
				</select>
			</logic:present> <logic:notPresent name="product">
				<select name="product.freeDeliver">
					<option value="0">否</option>
					<option value="1">是</option>
				</select>
			</logic:notPresent></td>
			<td nowrap class="td_01">套装主商品ID</td>
			<td colspan="3" class="td_02"><input type="text"
				name="product.main" value="${product.main}" readonly />&nbsp;&nbsp;<input type="button" class="btn" name="selector" value="选择" onclick="javascript:productSelector('','product.main')" />&nbsp;<input type="button" class="btn" name="clear" value="清空" onclick="javascript:clean('product.main');" /></td>
		</tr>
		<tr>
			<td nowrap class="td_01">套装其他商品ID</td>
			<td colspan="3" class="td_02">
			<input type="hidden" id="productChild" name="product.child" value="${product.child}" />
			<table width="99%" id="childList">
				<tr>
					<td colspan="4" align="center">
					<input type="button" class="btn" name="selector" value="选择" onclick="javascript:productSelector('childList','product.child')" />					
					<input type="button" class="btn" value="复制ID" onclick="copy_clip(document.getElementById('productChild').value)"/>
					</td>
				</tr>
				<tr>
					<th class="td_01">名称</th>
					<th class="td_01">类别</th>
					<th class="td_01">品牌</th>
					<th class="td_01">操作</th>
				</tr>
				<logic:present name="product" property="childs">
					<logic:iterate id="child" name="product" property="childs">
						<tr>
							<td class="td_03">${child.name}</td>
							<td class="td_03">${child.catalogName}</td>
							<td class="td_03">${child.brandName}</td>
							<td class="td_03"><a href="javascript:void(0);"
								onclick="javascript:removeAssociateItem222222222222(this,'childList','product.child','${child.id}')">删除</a></td>
						</tr>
					</logic:iterate>
				</logic:present>
			</table>			</td>
			<td nowrap class="td_01">赠品信息</td>
			<td colspan="3" class="td_02"><input type="hidden" id="productFree"
				name="product.free" value="${product.free}" />
			<table width="98%" id="freeList">
				<tr>
					<td colspan="4" align="center">
					<input type="button" class="btn" name="selector" value="选择"
						onclick="javascript:productSelector('freeList','product.free')" />
						<input type="button" class="btn" value="复制ID" onclick="copy_clip(document.getElementById('productFree').value)"/>
						</td>
						
				</tr>
				<tr>
					<th class="td_01">名称</th>
					<th class="td_01">类别</th>
					<th class="td_01">品牌</th>
					<th class="td_01">操作</th>
				</tr>
				<logic:present name="product" property="frees">
					<logic:iterate id="free" name="product" property="frees">
						<tr>
							<td class="td_03">${free.name}</td>
							<td class="td_03">${free.catalogName}</td>
							<td class="td_03">${free.brandName}</td>
							<td class="td_03"><a href="javascript:void(0);"
								onclick="javascript:removeAssociateItem(this,'freeList','product.free')">删除</a></td>
						</tr>
					</logic:iterate>
				</logic:present>
			</table>			</td>
		</tr>
		<tr>
			<td nowrap class="td_01">可搜索内容</td>
			<td colspan="3" class="td_02">
				<iframe id="searchs" name="searchs" width="99%" frameborder="0" src="${ctx}/product/productMessage.do?method=getProductSearchs&id=${product.id}&catalogId=${product.catalogId}"></iframe>			</td>
			<td nowrap class="td_01">相关推荐产品</td>
			<td colspan="3" class="td_02">
			<input type="hidden" id="productRecommend" name="product.recommend" value="${product.recommend}" />
			<table width="99%" id="recommendList">
				<tr>
					<td colspan="4" align="center"><input type="button" class="btn"
						name="selector" value="选择"
						onclick="javascript:productSelector('recommendList','product.recommend')" />
						<input type="button" class="btn" value="复制ID" onclick="copy_clip(document.getElementById('productRecommend').value)"/>
						</td>
				</tr>
				<tr>
					<th class="td_01" height="25px">名称</th>
					<th class="td_01">类别</th>
					<th class="td_01">品牌</th>
					<th class="td_01">操作</th>
				</tr>
				<logic:present name="product" property="recommends">
					<logic:iterate id="recommend" name="product" property="recommends">
						<tr>
							<td class="td_03">${recommend.name}</td>
							<td class="td_03">${recommend.catalogName}</td>
							<td class="td_03">${recommend.brandName}</td>
							<td class="td_03"><a href="javascript:void(0);" onclick="javascript:removeAssociateItem11111111(this,'recommendList','product.recommend','${recommend.id}')">删除</a></td>
						</tr>
					</logic:iterate>
				</logic:present>
			</table>			</td>
		</tr>
		<tr>
			<td nowrap class="td_01">售后服务</td>
			<td colspan="7" class="td_02" height="200px"><FCK:editor
				id="product.service" basePath="${ctx}/FCKeditor/" width="98%"
				height="300" defaultLanguage="zh-cn" toolbarSet="catalog"
				tabSpaces="8"
				imageBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/pages/safeai/jsp/connector"
				linkBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/pages/safeai/jsp/connector"
				flashBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/pages/safeai/jsp/connector"
				imageUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"
				linkUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"
				flashUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash">
              ${product.service}
  			</FCK:editor></td>
		</tr>
		<tr>
			<td colspan="8" align="center">
				<input type="submit" class="btn" name="submit" value="提交">
		        </td>
		</tr>
	</table> 
	<input type="hidden" name="product.search1" value="" />
	<input type="hidden" name="product.search2" value="" />
	<input type="hidden" name="product.search3" value="" />
	<input type="hidden" name="product.search4" value="" />
	<input type="hidden" name="product.search5" value="" />
	<input type="hidden" name="product.search6" value="" />
	<input type="hidden" name="product.search7" value="" />
	<input type="hidden" name="product.search8" value="" />
	<input type="hidden" name="product.search9" value="" />
	<input type="hidden" name="product.search10" value="" />
	<input type="hidden" name="forwardModify" value="${param.forward}" />
	<c:if test="${param.forward=='ToSpecialType'}">
		<input type="hidden" name="forwardValue" value="${product.specialType}" />
	</c:if>
	<c:if test="${param.forward=='ToStatus'}">
		<input type="hidden" name="forwardValue" value="${product.status}" />
		<input type="hidden" name="forward" value="product.status" />
	</c:if>
	<c:if test="${param.forward=='ToStatusStop'}">
		<input type="hidden" name="forwardValue" value="${product.status}" />
		
	</c:if> 
	<input type="hidden" name="pager.offset" value="${po}" />
	<input type="hidden" name="pageSize" value="${ps}" />
</html:form>
<div
	style="clear: both; text-align: center; padding-top: 10px; padding-bottom: 10px;">
<form action="${ctx}/product/productMessage.do?method=getProductSearchs"
	method="post" name="subSearchs" target="searchs"></form>
</div>
</body>
</html>
<script language="javascript">  
function copy_clip(copy){ 
if (window.clipboardData){
window.clipboardData.setData("Text", copy);}
else if (window.netscape){
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
if (!clip) return;
var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
if (!trans) return;
trans.addDataFlavor('text/unicode');
var str = new Object();
var len = new Object();
var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
var copytext=copy;
str.data=copytext;
trans.setTransferData("text/unicode",str,copytext.length*2);
var clipid=Components.interfaces.nsIClipboard;
if (!clip) return false;
clip.setData(trans,null,clipid.kGlobalClipboard);}
alert("已复制:"+copy)
return false;
}
</script>
